domain_setmaxmem takes an int, not a long, for the maxmem_kb parameter. The
authoremellor@ewan <emellor@ewan>
Tue, 20 Sep 2005 16:29:57 +0000 (17:29 +0100)
committeremellor@ewan <emellor@ewan>
Tue, 20 Sep 2005 16:29:57 +0000 (17:29 +0100)
underlying xc_domain_setmaxmem already took an unsigned int, and
PyArg_ParseTupleAndKeywords call was only parsing an int, so there is no way
that longer values would get through here in any case.  Fixing the documentation
and the local variable is the best solution, until someone decides that we need
to support maxmem values greater than 2TiB.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
tools/python/xen/lowlevel/xc/xc.c

index c7c09efbc14bdba8cf008d589484032021398554..d7452fabd13caf252e1495444be42667ee098662 100644 (file)
@@ -847,7 +847,7 @@ static PyObject *pyxc_domain_setmaxmem(PyObject *self,
     XcObject *xc = (XcObject *)self;
 
     u32 dom;
-    unsigned long maxmem_kb;
+    unsigned int maxmem_kb;
 
     static char *kwd_list[] = { "dom", "maxmem_kb", NULL };
 
@@ -1178,7 +1178,7 @@ static PyMethodDef pyxc_methods[] = {
       METH_VARARGS | METH_KEYWORDS, "\n"
       "Set a domain's memory limit\n"
       " dom [int]: Identifier of domain.\n"
-      " maxmem_kb [long]: .\n"
+      " maxmem_kb [int]: .\n"
       "Returns: [int] 0 on success; -1 on error.\n" },
 
     { "domain_memory_increase_reservation",